<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>绩效考核  <{$smarty.const.WEB_NAME}></title>
	<link rel="stylesheet" type="text/css" href="./skin/default/style.css" />
	<script type="text/javascript" src="./skin/default/comm.js"></script> 
	<script type="text/javascript" src="./skin/default/calendar.js"></script>
</HEAD>

<BODY>
	<table>
		<tr>
			<th align="center"><{$year}>年<{$month}>月技能等级考核统计</th>
		</tr>
	</table>
	<table width="100%" border="1" cellspacing="0" bordercolor="#cfcfcd" cellpadding="0" class="tableList tip_bug">
		<tr>
			<td align="center">员工姓名</td>
			<td align="center">考核类别</td>
			<td align="center">考核级别</td>
			<td align="center">等级系数</td>
			<td align="center">总计得分</td>
			<td align="center">考核评定</td>
		</tr>
		<{section name=i loop=$list}>
		<tr>
			<td align="center"><{$list[i].name}></td>
			<td align="center">
				<{if $list[i].type == 1}>开发
				<{elseif $list[i].type == 2}>测试
				<{elseif $list[i].type == 3}>集成
				<{else}>未知
				<{/if}>
			</td>
			<td align="center"><{$list[i].level}></td>
			<td align="center"><{$list[i].coefficient}></td>
			<td align="center"><{$list[i].scoreSum}></td>
			<td align="center">
				<{if $list[i].skillLevel == 1}>优秀
				<{elseif $list[i].skillLevel == 2}>良好
				<{elseif $list[i].skillLevel == 3}>中等
				<{elseif $list[i].skillLevel == 4}>及格
				<{elseif $list[i].skillLevel == 5}>差等
				<{else}>未知
				<{/if}>
			</td>
		</tr>
		<{/section}>
	</table>

	<table width="100%" border="1" cellspacing="0" bordercolor="#cfcfcd" cellpadding="0" class="tableList tip_bug">
	<form method="post" id="queryId" onsubmit="return OnCheck()" action="?q=kpiManage/">
		<tr>
		  <td align="center"> 
			<input type="text" width="4" id="yearId" name="year" value="<{$year}>" />
			<input type="text" width="2" id="monthId" name="month" value="<{$month}>" />
			<input type="submit" value="指定查询" class="sub_btn" onclick="javascript:OnCurrQuery()"/>
			<{if $smarty.session.type == 1}>
			<input type="submit" value="重新统计" class="sub_btn" onclick="javascript:OnReStat()"/>
			<{/if}>
		  </td>
		  <td align="center">
			<input type="submit" value="查询上月" class="sub_btn" onclick="javascript:OnPrevQuery()"/>
			<input type="submit" value="查询下月" class="sub_btn" onclick="javascript:OnNextQuery()"/>
		  </td>
		  <td align="center">
			<input type="button" value="导出记录" class="sub_btn" onclick="javascript:OnExport()"/>
		  </td>
		</tr>
	</form>
	</table>

	<script type="text/javascript">
		<!--
		function OnCheck() {
			var year = $('yearId').value;
			if( year < 2011 || year > 10000 ) {
				window.alert("非法的年份!");
				return false;
			}

			var month = $('monthId').value;
			if( month < 1 || month > 12 ) {
				window.alert("非法的月份!");
				return false;
			}

			return true;
		}

		// 重新统计
		function OnReStat() {
			$('queryId').action += "reStatSkillKpi";
		}
		
		// 指定查询
		function OnCurrQuery() {
			$('queryId').action += "skillKpiStat";
		}
		
		// 查询上月
		function OnPrevQuery() {
			$('queryId').action += "skillKpiStat";
			var year = $('yearId').value;
			var month = $('monthId').value;
			if( month == 1 ) {
				$('yearId').value = parseInt(year, 10) - 1;
				$('monthId').value = 12;
			} else {
				$('monthId').value = parseInt(month, 10) - 1;
			}
		}
		
		// 查询下月
		function OnNextQuery() {
			$('queryId').action += "skillKpiStat";
			var year = $('yearId').value;
			var month = $('monthId').value;
			if( month == 12 ) {
				$('yearId').value = parseInt(year, 10) + 1;
				$('monthId').value = 1;
			} else {
				$('monthId').value = parseInt(month, 10) + 1;
			}
		}
		//-->
	</script>
</BODY>
</HTML>